<template>
  <div id="pageHead" :class="{'page_head_opacity': opacity}">
    <p class="iconfont icon-ziyuan" @click="clickBack"></p>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'pageHead',
  data () {
    return {};
  },
  methods: {
    clickBack () {
      this.$router.go(-1);
    }
  },
  props: [
    'opacity'
  ]
};
</script>

<style lang="scss">
  #pageHead {
    position: fixed;
    top: 0;
    left: 0;
    left: 50%;
    width:  100%;
    margin-left: -360px;
    height: 67px;
    line-height: 67px;
    font-size: 34px;
    text-align: center;
    background:rgba(255,122,36,1);
    z-index: 91;
    font-size:24px;
    color:rgba(255,255,255,1);
    .icon-ziyuan {
      position: absolute;
      top: 0;
      left: 0;
      width: 120px;
      font-size: 30px;
    }
    &.page_head_opacity {
      background: none;
    }
  }
</style>
